﻿using AVIS.OutBound.Stores;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AVIS.OutBound.Orders
{
    public interface IOrderRepository
    {
        /// <summary>
        /// 获取指定的订单号数据
        /// </summary>
        /// <param name="orderNo">订单号</param>
        /// <param name="surname">用户的姓</param>
        /// <returns></returns>
        Order GetOrder(string orderNo, string surname = "");

        /// <summary>
        /// 保存订单到数据库
        /// </summary>
        /// <param name="order">订单</param>
        void SaveOrder(Order order);

        /// <summary>
        /// 取消预定
        /// </summary>
        /// <param name="order">订单</param>
        void CancelOrder(Order order);

        /// <summary>
        /// 更新订单的YouyouOrderID
        /// </summary>
        /// <param name="orderNo">订单号</param>
        /// <param name="youyouOrderID"></param>
        void UpdateYouyouOrderID(string orderNo, int youyouOrderID);
    }
}
